local E, L, V, P, G,_ = unpack(ElvUI)
local AS = E:GetModule('AddOnSkins')
local S = E:GetModule('Skins')

local name = "OutfitterSkin"
function AS:SkinOutfitter()
CharacterFrame:HookScript("OnShow", function(self) PaperDollSidebarTabs:SetPoint("BOTTOMRIGHT", CharacterFrameInsetRight, "TOPRIGHT", -14, 0) end)
OutfitterFrame:HookScript("OnShow", function(self) 
	AS:SkinFrame(OutfitterFrame)
	OutfitterFrameTab1:Size(60,25)
	OutfitterFrameTab2:Size(60,25)
	OutfitterFrameTab3:Size(60,25)
	OutfitterMainFrame:StripTextures(True)
	for i = 0,13 do
		if _G["OutfitterItem"..i.."OutfitSelected"] then 
			S:HandleButton(_G["OutfitterItem"..i.."OutfitSelected"])
			_G["OutfitterItem"..i.."OutfitSelected"]:ClearAllPoints()
			_G["OutfitterItem"..i.."OutfitSelected"]:Size(16)
			_G["OutfitterItem"..i.."OutfitSelected"]:Point("LEFT", _G["OutfitterItem"..i.."Outfit"], "LEFT", 8, 0)
		end
	end
end)


	OutfitterMainFrameScrollbarTrench:StripTextures(True)
	OutfitterFrameTab1:StripTextures(True)
	OutfitterFrameTab2:StripTextures(True)
	OutfitterFrameTab3:StripTextures(True)
	OutfitterFrameTab1:ClearAllPoints()
	OutfitterFrameTab2:ClearAllPoints()
	OutfitterFrameTab3:ClearAllPoints()
	OutfitterFrameTab1:Point("TOPLEFT", OutfitterFrame, "BOTTOMRIGHT", -65, -2)
	OutfitterFrameTab2:Point("LEFT", OutfitterFrameTab1, "LEFT", -65, 0)
	OutfitterFrameTab3:Point("LEFT", OutfitterFrameTab2, "LEFT", -65, 0)
	S:HandleButton(OutfitterFrameTab1)
	S:HandleButton(OutfitterFrameTab2)
	S:HandleButton(OutfitterFrameTab3)

	S:HandleScrollBar(OutfitterMainFrameScrollFrameScrollBar)
	S:HandleCloseButton(OutfitterCloseButton)
	S:HandleButton(OutfitterNewButton)
	S:HandleButton(OutfitterEnableNone)
	S:HandleButton(OutfitterEnableAll)

	AS:Desaturate(OutfitterButton)
	OutfitterButton:ClearAllPoints()
	OutfitterButton:SetPoint("RIGHT", PaperDollSidebarTabs, "RIGHT", 26, -2)
	OutfitterButton:SetHighlightTexture(nil)

	OutfitterSlotEnables:SetFrameStrata("HIGH")
	S:HandleCheckBox(OutfitterEnableHeadSlot)
	S:HandleCheckBox(OutfitterEnableNeckSlot)
	S:HandleCheckBox(OutfitterEnableShoulderSlot)
	S:HandleCheckBox(OutfitterEnableBackSlot)
	S:HandleCheckBox(OutfitterEnableChestSlot)
	S:HandleCheckBox(OutfitterEnableShirtSlot)
	S:HandleCheckBox(OutfitterEnableTabardSlot)
	S:HandleCheckBox(OutfitterEnableWristSlot)
	S:HandleCheckBox(OutfitterEnableMainHandSlot)
	S:HandleCheckBox(OutfitterEnableSecondaryHandSlot)
	S:HandleCheckBox(OutfitterEnableHandsSlot)
	S:HandleCheckBox(OutfitterEnableWaistSlot)
	S:HandleCheckBox(OutfitterEnableLegsSlot)
	S:HandleCheckBox(OutfitterEnableFeetSlot)
	S:HandleCheckBox(OutfitterEnableFinger0Slot)
	S:HandleCheckBox(OutfitterEnableFinger1Slot)
	S:HandleCheckBox(OutfitterEnableTrinket0Slot)
	S:HandleCheckBox(OutfitterEnableTrinket1Slot)

	S:HandleButton(OutfitterItemComparisons)
	S:HandleButton(OutfitterTooltipInfo)
	S:HandleButton(OutfitterShowHotkeyMessages)
	S:HandleButton(OutfitterShowMinimapButton)
	S:HandleButton(OutfitterShowOutfitBar)
	S:HandleButton(OutfitterAutoSwitch)
	OutfitterItemComparisons:Size(20)
	OutfitterTooltipInfo:Size(20)
	OutfitterShowHotkeyMessages:Size(20)
	OutfitterShowMinimapButton:Size(20)
	OutfitterShowOutfitBar:Size(20)
	OutfitterAutoSwitch:Size(20)

	OutfitterShowOutfitBar:Point("TOPLEFT", OutfitterAutoSwitch, "BOTTOMLEFT", 0, -5)

	S:HandleButton(OutfitterEditScriptDialogDoneButton)
	S:HandleButton(OutfitterEditScriptDialogCancelButton)
	S:HandleScrollBar(OutfitterEditScriptDialogSourceScriptScrollBar)
	OutfitterEditScriptDialogSourceScript:CreateBackdrop()
	AS:SkinFrame(OutfitterEditScriptDialog)
	S:HandleCloseButton(OutfitterEditScriptDialog.CloseButton)
	S:HandleTab(OutfitterEditScriptDialogTab1)
	S:HandleTab(OutfitterEditScriptDialogTab2)
	--S:HandleDropDownBox(OutfitterEditScriptDialogPresetScript)

end

AS:RegisterSkin(name,AS.SkinOutfitter)
